﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using EvacuationWidth.ModelLayer;
using ModelCheckUtility.ControlLayer;
using ModelCheckUtility.ModelLayer;

namespace EvacuationWidth.ControlLayer
{
	internal class AreaGeter
	{
		internal List<AreaPacker_EvacuationWidth> GetAllAreas(Document useDoc, List<Level> lstSelectLeves)
		{
			List<Phase> list = new List<Phase>();
			foreach (object obj in useDoc.Phases)
			{
				Phase item = (Phase)obj;
				list.Add(item);
			}
			List<AreaPacker_EvacuationWidth> allAreaPackersInDocument = this.m_thisFinder.GetAllAreaPackersInDocument(useDoc, lstSelectLeves, new List<ICloseCurveAnalays>(), list, new List<BuiltInCategory>
			{
				(BuiltInCategory)(-2000120),
				(BuiltInCategory)(-2000080)
			}, true);
			for (int i = 0; i < allAreaPackersInDocument.Count; i++)
			{
				allAreaPackersInDocument[i].AdaptThisPacker();
			}
			return allAreaPackersInDocument;
		}

		private BaseAreaFinder<AreaPacker_EvacuationWidth, RoomPacker_EvacuationWidth, BaseBoundarySegmentPacker, DoorPacker_EvacuationWidth, HostInRoomPacker_EvacuationWidth> m_thisFinder = new BaseAreaFinder<AreaPacker_EvacuationWidth, RoomPacker_EvacuationWidth, BaseBoundarySegmentPacker, DoorPacker_EvacuationWidth, HostInRoomPacker_EvacuationWidth>();
	}
}
